package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.entity.*;
import com.ecoolex.ying.space.pojo.*;

import java.util.List;

public interface DesignerProjectService {
    DesignerProject createProject(Integer userId, EditDesignerProjectDTO add, String createUser) throws BizException;

    DesignerProject copyProject(Integer userId, DesignerProject project, String createUser);

    void updateProject(Integer userId, Integer projectId, EditDesignerProjectDTO edit, String updateUser) throws BizException;

    void deleteProject(Integer userId, Integer projectId, String updateUser) throws BizException;

    DesignerProject getProjectByUserIdAndId(Integer userId, Integer projectId);

    Pagination<DesignerProject> queryProjectByUserId(QueryDesignerProjectByUserDTO query, Integer userId, Sorting[] sorts, Page page);

    DesignerProject getProjectById(Integer projectId);

    Pagination<DesignerProject> queryProject(QueryDesignerProjectDTO query, Sorting[] sorts, Page page);

    void updateAttribute(Integer userId, Integer projectId, EditDesignerProjectAttributeDTO edit, String updateUser) throws BizException;

    DesignerProjectAttribute getAttributeByProjectId(Integer projectId);

    DesignerProjectShare resetShare(Integer userId, Integer projectId, Integer expirydateDay, String updateUser) throws BizException;

    void clearShare(Integer userId, Integer projectId) throws BizException;

    DesignerProjectShare getShareByProjectId(Integer projectId);

    DesignerProjectShare getShareByShareId(String shareId);

    DesignerProjectShare getShareByShareIdAndPassword(String shareId, String password);

    List<DesignerProjectPlanItemsDTO> updatePlanItems(DesignerProject project, List<EditDesignerProjectPlanItemsDTO> editList, String updateUser) throws BizException;

    List<DesignerProjectListingItemsDTO> updateListingItems(DesignerProject project, List<EditDesignerProjectListingItemsDTO> editList, String updateUser) throws BizException;

    List<DesignerProjectItemsWithBLOBs> queryItemsByProjectId(Integer projectId);

    List<DesignerProjectItemsProduct> queryItemsProductByItemsId(Integer itemsId);

    void updateItemsProductCustom(Integer userId, Integer itemsProductId, EditDesignerProjectItemsProductCustomDTO edit, String updateUser) throws BizException;

    DesignerProjectItemsProductCustom getItemsProductCustomByItemsProductId(Integer itemsProductId);

    List<DesignerProjectItemsProductCustom> queryItemsProductCustomByItemsId(Integer itemsId);

    boolean existPickGoodsFavoriteByUserIdAndPickGoodsId(Integer userId, Integer pickGoodsId);

    void addPickGoodsFavorite(Integer userId, Integer pickGoodsId, String createUser);

    void deletePickGoodsFavorite(Integer userId, Integer pickGoodsId, String updateUser);

    UserGoodsAttachmentDownloadTask createDownloadTaskByGoods(Integer userId, Goods goods, Integer goodsAttachmentType, String createUser) throws BizException;

    UserGoodsAttachmentDownloadTask createDownloadTaskByProject(Integer userId, DesignerProject project, Integer goodsAttachmentType, String createUser) throws BizException;

    void deleteDownloadTask(Integer userId, Integer taskId, String updateUser) throws BizException;

    Pagination<UserGoodsAttachmentDownloadTask> queryDownloadTaskByUserId(Integer userId, QueryUserGoodsAttachmentDownloadTaskDTO query, Sorting[] sorts, Page page);

    List<UserGoodsAttachmentDownloadTask> queryDownloadTaskByUserId(Integer userId, Integer maxTaskId, Integer size);
}
